package test.multthread;

/**
 * Created by IntelliJ IDEA.
 * User: luotao
 * Date: 12-5-29
 * Time: 15:56
 */
public class SubThread extends Thread {
    Globol g;

    public SubThread(Globol globol) {
        this.g = globol;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            g.count--;
            try {
                sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        }

    }
}
